cpl_fields_getField     #  returns string for nth aVect attribute
cpl_fields_getLongName  #  returns netCDF longname and unit strings
cpl_fields_getField     #  returns string for nth aVect attribute
cpl_fields_getLongName  #  returns netCDF longname and unit strings
cpl_fields_atmname='atm'
cpl_fields_ocnname='ocn'
cpl_fields_icename='ice'
cpl_fields_lndname='lnd'
cpl_fields_rtmname='roff'
cpl_fields_cplname='cpl'
cpl_fields_ibuf_total    = 100  #  size of info-buffer
cpl_fields_ibuf_rcode    =   1  #  error code
cpl_fields_ibuf_cdate    =   2  #  current date: yymmdd
cpl_fields_ibuf_sec      =   3  #  elapsed sec on date
cpl_fields_ibuf_ncpl     =   4  #  cpl comm's per day
cpl_fields_ibuf_nfields  =  10
cpl_fields_ibuf_gsize    =  11
cpl_fields_ibuf_lsize    =  12
cpl_fields_ibuf_gisize   =  13
cpl_fields_ibuf_gjsize   =  14
cpl_fields_ibuf_lisize   =  15
cpl_fields_ibuf_ljsize   =  16
cpl_fields_ibuf_stopeod  =  19
cpl_fields_ibuf_stopnow  =  20
cpl_fields_ibuf_resteod  =  21
cpl_fields_ibuf_restnow  =  22
cpl_fields_ibuf_histeod  =  23
cpl_fields_ibuf_histnow  =  24
cpl_fields_ibuf_histavg  =  25
cpl_fields_ibuf_diageod  =  26
cpl_fields_ibuf_diagnow  =  27
cpl_fields_ibuf_infotim  =  28
cpl_fields_ibuf_infobug  =  29
cpl_fields_ibuf_precadj  =  31  #  precip adjustment factor (* 1.0e+6)
cpl_fields_ibuf_ashift   =  32  #  albedo calculation time shift
cpl_fields_ibuf_nbasins  =  33  #  number of active runoff basins
cpl_fields_ibuf_xalbic   =  34  #  request extra albedo solar init msg
cpl_fields_ibuf_inimask  =  36  #  flag cpl to send back domain spec for lnd
cpl_fields_ibuf_dead     =  37  #  non-0 <=> dead model
cpl_fields_ibuf_domain   =  40
cpl_fields_ibuf_userest  =  41  #  non-0 <=> use restart data sent to cpl
cpl_fields_rbuf_total    =  50  #  size of real info-buffer
cpl_fields_rbuf_spval    =   1  #  the special value
cpl_fields_rbuf_eccen    =  10  #  Earth's eccentricity
cpl_fields_rbuf_obliqr   =  11  #  Earth's Obliquity
cpl_fields_rbuf_lambm0   =  12  #  longitude of perihelion at v-equinox
cpl_fields_rbuf_mvelpp   =  13  #  Earth's Moving vernal equinox of orbit +pi
cpl_fields_grid_total  = 7
cpl_fields_grid_fields = &
cpl_fields_grid_lat    = 1     #  lat from component
cpl_fields_grid_lon    = 2     #  lon from component
cpl_fields_grid_area   = 3     #  area from component
cpl_fields_grid_aream  = 4     #  area from mapping file
cpl_fields_grid_index  = 5     #  global index
cpl_fields_grid_mask   = 6     #  mask, 0 = inactive cell
cpl_fields_grid_pid    = 7     #  proc id number
cpl_fields_a2c_total  = 19
cpl_fields_a2c_states = &
cpl_fields_a2c_fluxes = &
cpl_fields_a2c_fields = &
cpl_fields_a2c_z      =  1  #  bottom atm level height
cpl_fields_a2c_u      =  2  #  bottom atm level zon wind
cpl_fields_a2c_v      =  3  #  bottom atm level mer wind
cpl_fields_a2c_tbot   =  4  #  bottom atm level temp
cpl_fields_a2c_ptem   =  5  #  bottom atm level pot temp
cpl_fields_a2c_shum   =  6  #  bottom atm level spec hum
cpl_fields_a2c_dens   =  7  #  bottom atm level air den
cpl_fields_a2c_pbot   =  8  #  bottom atm level pressure
cpl_fields_a2c_pslv   =  9  #  sea level atm pressure
cpl_fields_a2c_lwdn   = 10  #  downward lw heat flux
cpl_fields_a2c_rainc  = 11  #  prec: liquid "convective"
cpl_fields_a2c_rainl  = 12  #  prec: liquid "large scale"
cpl_fields_a2c_snowc  = 13  #  prec: frozen "convective"
cpl_fields_a2c_snowl  = 14  #  prec: frozen "large scale"
cpl_fields_a2c_swndr  = 15  #  sw: nir direct  downward
cpl_fields_a2c_swvdr  = 16  #  sw: vis direct  downward
cpl_fields_a2c_swndf  = 17  #  sw: nir diffuse downward
cpl_fields_a2c_swvdf  = 18  #  sw: vis diffuse downward
cpl_fields_a2c_swnet  = 19  #  sw: net
cpl_fields_c2a_total  = 17
cpl_fields_c2a_states = &
cpl_fields_c2a_fluxes = &
cpl_fields_c2a_fields = &
cpl_fields_c2a_tref  =  1  #  2m reference temperature
cpl_fields_c2a_qref  =  2  #  2m reference specific humidity
cpl_fields_c2a_avsdr =  3  #  albedo, visible, direct
cpl_fields_c2a_anidr =  4  #  albedo, near-ir, direct
cpl_fields_c2a_avsdf =  5  #  albedo, visible, diffuse
cpl_fields_c2a_anidf =  6  #  albedo, near-ir, diffuse
cpl_fields_c2a_t     =  7  #  surface temperature
cpl_fields_c2a_sst   =  8  #  sea surface temperature
cpl_fields_c2a_snowh =  9  #  surface snow depth
cpl_fields_c2a_ifrac = 10  #  surface ice fraction
cpl_fields_c2a_ofrac = 11  #  surface ocn fraction
cpl_fields_c2a_taux  = 12  #  wind stress, zonal
cpl_fields_c2a_tauy  = 13  #  wind stress, meridional
cpl_fields_c2a_lat   = 14  #  latent          heat flux
cpl_fields_c2a_sen   = 15  #  sensible        heat flux
cpl_fields_c2a_lwup  = 16  #  upward longwave heat flux
cpl_fields_c2a_evap  = 17  #  evaporation    water flux
cpl_fields_i2c_total  = 22
cpl_fields_i2c_states = &
cpl_fields_i2c_fluxes = &
cpl_fields_i2c_fields = &
cpl_fields_i2c_t     =  1  #  temperature
cpl_fields_i2c_tref  =  2  #  2m reference temperature
cpl_fields_i2c_qref  =  3  #  2m reference specific humidity
cpl_fields_i2c_ifrac =  4  #  fractional ice coverage
cpl_fields_i2c_avsdr =  5  #  albedo: visible, direct
cpl_fields_i2c_anidr =  6  #  albedo: near ir, direct
cpl_fields_i2c_avsdf =  7  #  albedo: visible, diffuse
cpl_fields_i2c_anidf =  8  #  albedo: near ir, diffuse
cpl_fields_i2c_index =  9  #  global data compr index
cpl_fields_i2c_taux  = 10  #  wind stress, zonal
cpl_fields_i2c_tauy  = 11  #  wind stress, meridional
cpl_fields_i2c_lat   = 12  #  latent          heat flux
cpl_fields_i2c_sen   = 13  #  sensible        heat flux
cpl_fields_i2c_lwup  = 14  #  upward longwave heat flux
cpl_fields_i2c_evap  = 15  #  evaporation    water flux
cpl_fields_i2c_swnet = 16  #  shortwave: net absorbed
cpl_fields_i2c_swpen = 17  #  net SW penetrating ice
cpl_fields_i2c_melth = 18  #  heat  flux from melting ice
cpl_fields_i2c_meltw = 19  #  water flux from melting ice
cpl_fields_i2c_salt  = 20  #  salt  flux from melting ice
cpl_fields_i2c_otaux = 21  #  ice/ocn stress, zonal
cpl_fields_i2c_otauy = 22  #  ice/ocn stress, meridional
cpl_fields_c2i_total  = 21
cpl_fields_c2i_states = &
cpl_fields_c2i_fluxes = &
cpl_fields_c2i_fields = &
cpl_fields_c2i_ot    =  1  #  ocn temp
cpl_fields_c2i_os    =  2  #  ocn salinity
cpl_fields_c2i_ou    =  3  #  ocn u velocity
cpl_fields_c2i_ov    =  4  #  ocn v velocity
cpl_fields_c2i_dhdx  = 12  #  ocn surface slope, zonal
cpl_fields_c2i_dhdy  = 13  #  ocn surface slope, merid
cpl_fields_c2i_z     =  5  #  atm bottom layer height
cpl_fields_c2i_u     =  6  #  atm u velocity
cpl_fields_c2i_v     =  7  #  atm v velocity
cpl_fields_c2i_ptem  =  8  #  atm potential temp
cpl_fields_c2i_tbot  =  9  #  atm bottom temp
cpl_fields_c2i_shum  = 10  #  atm specfic humidity
cpl_fields_c2i_dens  = 11  #  atm air density
cpl_fields_c2i_q     = 14  #  ocn freeze or melt heat
cpl_fields_c2i_swndr = 15  #  atm sw near-ir, direct
cpl_fields_c2i_swvdr = 16  #  atm sw visable, direct
cpl_fields_c2i_swndf = 17  #  atm sw near-ir, diffuse
cpl_fields_c2i_swvdf = 18  #  atm sw visable, diffuse
cpl_fields_c2i_lwdn  = 19  #  long-wave down
cpl_fields_c2i_rain  = 20  #  rain
cpl_fields_c2i_snow  = 21  #  snow
cpl_fields_l2c_total  = 15
cpl_fields_l2c_states = &
cpl_fields_l2c_fluxes = &
cpl_fields_l2c_fields = &
cpl_fields_l2c_t     =  1  #  temperature
cpl_fields_l2c_tref  =  2  #  2m reference temperature
cpl_fields_l2c_qref  =  3  #  2m reference specific humidity
cpl_fields_l2c_avsdr =  4  #  albedo: direct , visible
cpl_fields_l2c_anidr =  5  #  albedo: direct , near-ir
cpl_fields_l2c_avsdf =  6  #  albedo: diffuse, visible
cpl_fields_l2c_anidf =  7  #  albedo: diffuse, near-ir
cpl_fields_l2c_snowh =  8  #  snow height
cpl_fields_l2c_taux  =  9  #  wind stress, zonal
cpl_fields_l2c_tauy  = 10  #  wind stress, meridional
cpl_fields_l2c_lat   = 11  #  latent          heat flux
cpl_fields_l2c_sen   = 12  #  sensible        heat flux
cpl_fields_l2c_lwup  = 13  #  upward longwave heat flux
cpl_fields_l2c_evap  = 14  #  evaporation    water flux
cpl_fields_l2c_swnet = 15  #  2m reference temperature
cpl_fields_c2l_total  = 18
cpl_fields_c2l_states = &
cpl_fields_c2l_fluxes = &
cpl_fields_c2l_fields = &
cpl_fields_c2l_z     =  1  #  bottom atm level height
cpl_fields_c2l_u     =  2  #  bottom atm level zon wind
cpl_fields_c2l_v     =  3  #  bottom atm level mer wind
cpl_fields_c2l_tbot  =  4  #  bottom atm level temp
cpl_fields_c2l_ptem  =  5  #  bottom atm level pot temp
cpl_fields_c2l_shum  =  6  #  bottom atm level spec hum
cpl_fields_c2l_dens  =  7  #  bottom atm level air dens
cpl_fields_c2l_pbot  =  8  #  bottom atm level pressure
cpl_fields_c2l_pslv  =  9  #  sea level atm pressure
cpl_fields_c2l_lwdn  = 10  #  downward longwave heat flux
cpl_fields_c2l_rainc = 11  #  precip: liquid, convective
cpl_fields_c2l_rainl = 12  #  precip: liquid, large-scale
cpl_fields_c2l_snowc = 13  #  precip: frozen, convective
cpl_fields_c2l_snowl = 14  #  precip: frozen, large-scale
cpl_fields_c2l_swndr = 15  #  shortwave: nir direct  down
cpl_fields_c2l_swvdr = 16  #  shortwave: vis direct  down
cpl_fields_c2l_swndf = 17  #  shortwave: nir diffuse down
cpl_fields_c2l_swvdf = 18  #  shortwave: vis diffuse down
cpl_fields_c2lg_total  = 6
cpl_fields_c2lg_fields = &
cpl_fields_c2lg_alon  =  1  #  longitude
cpl_fields_c2lg_alat  =  2  #  latitude
cpl_fields_c2lg_aarea =  3  #  cell area
cpl_fields_c2lg_lfrac =  4  #  lnd fraction
cpl_fields_c2lg_lmask =  5  #  lnd mask
cpl_fields_c2lg_amask =  6  #  atm mask
cpl_fields_o2c_total  = 7
cpl_fields_o2c_states = &
cpl_fields_o2c_fluxes = &
cpl_fields_o2c_fields = &
cpl_fields_o2c_t    =  1  #  temperature
cpl_fields_o2c_u    =  2  #  velocity, zonal
cpl_fields_o2c_v    =  3  #  velocity, meridional
cpl_fields_o2c_s    =  4  #  salinity
cpl_fields_o2c_dhdx =  5  #  surface slope, zonal
cpl_fields_o2c_dhdy =  6  #  surface slope, meridional
cpl_fields_o2c_q    =  7  #  heat of fusion (q>0) melt pot (q<0)
cpl_fields_c2o_total  = 18
cpl_fields_c2o_states = &
cpl_fields_c2o_fluxes = &
cpl_fields_c2o_fields = &
cpl_fields_c2o_ifrac =  1  #  state: ice fraction
cpl_fields_c2o_press =  2  #  state: sea level pressure
cpl_fields_c2o_duu10 =  3  #  state: 10m wind speed squared
cpl_fields_c2o_taux  =  4  #  wind stress: zonal
cpl_fields_c2o_tauy  =  5  #  wind stress: meridional
cpl_fields_c2o_swnet =  6  #  heat flux: shortwave net
cpl_fields_c2o_lat   =  7  #  heat flux: latent
cpl_fields_c2o_sen   =  8  #  heat flux: sensible
cpl_fields_c2o_lwup  =  9  #  heat flux: long-wave up
cpl_fields_c2o_lwdn  = 10  #  heat flux: long-wave down
cpl_fields_c2o_melth = 11  #  heat flux: melt
cpl_fields_c2o_salt  = 12  #  salt flux
cpl_fields_c2o_prec  = 13  #  water flux: rain+snow
cpl_fields_c2o_snow  = 14  #  water flux: snow
cpl_fields_c2o_rain  = 15  #  water flux: rain
cpl_fields_c2o_evap  = 16  #  water flux: evap
cpl_fields_c2o_meltw = 17  #  water flux: melt
cpl_fields_c2o_roff  = 18  #  water flux: runoff
cpl_fields_r2c_total  = 1
cpl_fields_r2c_states = &
cpl_fields_r2c_fluxes = &
cpl_fields_r2c_fields = &
cpl_fields_r2c_fields = &
cpl_fields_r2c_runoff = 1
outfield    #  output field name
nfld        #  field number
cstring     #  colon delimited field string
mctIstr   #  mct list from input cstring
mctOStr   #  mct string for output outfield
fldstr      #  field name
longname    #  corresponding longname
units       #  corresponding units
nl = 60              #  max number of longnames
n                    #  generic loop index
lookup(nl,3)         #  longname lookup table
shortname            #  short name
firstCall = .true.   #  flags initializtion
subname = "(cpl_fields_getLongName)"
F00 = "('(cpl_fields_getLongName) ',4a)"
